﻿#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include <QLineEdit>
#include <QLabel>
#include <QPushButton>
#include <QCheckBox>
#include <QTimer>
#include "axiswidget.h"
#include "iowidget.h"

class DMC_B140_M;

QT_BEGIN_NAMESPACE
namespace Ui { class Dialog; }
QT_END_NAMESPACE

class Dialog : public QDialog
{
    Q_OBJECT

public:
    Dialog(QWidget *parent = nullptr);
    ~Dialog();
    void initGUI();

private slots:
    void onConnect();
    void onConnected();
    void onConnectionLost();

    void updateAlarmStatus(unsigned short axis, bool alarm, bool emstop);


private:
    Ui::Dialog *ui;
    AxisWidget *m_pAxisWidget;
    IOWidget *m_pIOWidget;
    QLineEdit * m_pLineEditIp;
    QPushButton * m_pPushButtonConnect;
    QPushButton * m_pPushButtonAbort;



    DMC_B140_M *m_pMotionControl;

    QTimer * m_timerXYZPos;

    int m_theoryPos[8];
    int m_encoderPos[8];
    bool m_io[8];

};
#endif // DIALOG_H
